package model

import "time"

type Relation struct {
	RelationID  int64     `json:"relationId" gorm:"column:relation_id;primary_key;auto_increment"`
	FollowingID int64     `json:"followingId" gorm:"column:following_id;not null"`         // 博主ID
	FollowerID  int64     `json:"followerId" gorm:"column:follower_id;not null;default:0"` // 粉丝ID
	CreateDate  time.Time `json:"createDate" gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;autoCreateTime"`
}

func (Relation) TableName() string {
	return "relation"
}

type RelationAction struct {
	FollowingID int64 `json:"followingId" form:"followingId"`
	ActionType  int64 `json:"actionType" form:"actionType"` // 1关注 2取消关注
}

type RelationMessage struct {
	FollowingID int64 `json:"followingId" form:"followingId"`
	FollowerID  int64 `json:"followerId" form:"followerId"`
	ActionType  int64 `json:"actionType" form:"actionType"` // 1关注 2取消关注
}
